include Makefile.def

CFLAGS += -I./aliens/libharu-2.1.0/include -I./aliens/libharu-2.1.0/win32/include
CFLAGS += -I./aliens/excel 
CFLAGS += -I./aliens/argtable2-12/src 
CFLAGS += -I./src 

ifeq ($(MODULES),yes)  
CFLAGS += -I./modules/oracle
CFLAGS +=  -I/usr/include/oracle/11.2/client64/
LDFLAGS = -L${ORACLE_HOME}/lib -lclntsh
endif


#STATIC_LIB_FLAGS = ${BUILD}/lib/report.a  ${BUILD}/lib/aliens.a 
LDFLAGS += -L${BUILD} -lfir
STATIC_LIB_FLAGS =  ${BUILD}/lib/aliens.a  


####################### DEMO SOURCE ##########################################
SRCS 	= \
	samples/ReportDemo.cpp \
	samples/OciDemo.cpp \

	
OBJS =  $(addprefix ${BUILD}/, $(SRCS:.cpp=.o))

${BUILD}/%.o: %.cpp	
	@$(MKDIR) ${BUILD}/samples
	$(CXX) $(OPTS) $(CFLAGS) -c ${COMPILIER_OUT}$@ $^   


EXE =  $(OBJS:.o=.exe)

#${BUILD}/lib/libfir.a
${BUILD}/%.exe:  ${BUILD}/%.o  
	@$(MKDIR) ${BUILD}/samples
	$(LD) $(LDFLAGS) ${COMPILIER_OUT} $@ $^  $(STATIC_LIB_FLAGS)
	

all: $(EXE)
	@echo " === samples has been built === " 

	
clean:
	$(RM) ${BUILD}/samples/*.*
	